package cn.singleton;

/**
 * 懒汉模式
 * 多线程中没有保证唯一
 * @auth wzy
 * @date 2023/11/4 9:30
 */

public class WaFactory {

    private WaFactory() {
        System.out.println("创建WaFactory");
    }

    private static WaFactory waFactory;

    public static WaFactory getInstance(){
        if (waFactory==null){
            waFactory = new WaFactory();
        }
        return waFactory;
    }
}
